<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Collection
 *
 * @author ketu
 */
class Zhishidi_Express_Model_Mysql4_Rate_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {

    protected function _construct() {
        $this->_init('zhishidi_express/rate');
    }

    public function addZoneToFilter($zone) {
        $this->getSelect()->where('main_table.rate_zone = ?', (int)$zone);
         return $this;
    }
    public function setWeightRange($weight) {
        $this->getSelect()->where('main_table.rate_from < ?', $weight)->where('main_table.rate_to > ?', $weight);
        return $this;
    }

}

?>
